You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently outgoing GameMessage's are checked using Network::isTransferCommand but incoming messages are not checked, which can potentially enable certain cheats. Credits to Caball for pointing this out.
This PR closes an anti-cheat gap by validating the GameMessage::Type of incoming network messages before appending them to TheCommandList, mirroring the outgoing check that already existed in GetCommandsFromCommandList. It also refactors isTransferCommand into a cleaner static helper isMessageTypeWithinNetworkRange that takes a Type value directly rather than a full GameMessage*.
NetGameCommandMsg::getGameMessageType() is added so the type can be inspected before constructing the full GameMessage, avoiding an unnecessary allocation on the rejection path.
The new incoming validation in RelayCommandsToCommandList is gated behind #if !RETAIL_COMPATIBLE_CRC; since RETAIL_COMPATIBLE_CRC defaults to 1 in GameDefines.h, the fix is inactive in standard community builds and only active in builds that explicitly opt out of retail CRC compatibility.
Confidence Score: 4/5
The refactoring is sound, but the new incoming-message type validation is compiled out in the default build, so the anti-cheat fix does not take effect in standard community releases.
The core security enforcement added by this PR — rejecting out-of-range incoming GameMessage types — is compiled out in every build where RETAIL_COMPATIBLE_CRC is 1, which is the default. The vulnerability remains open in standard community builds.
Core/GameEngine/Source/GameNetwork/Network.cpp — specifically the #if RETAIL_COMPATIBLE_CRC branching around the new validation logic
Implements the trivial getGameMessageType() accessor returning m_type; no issues
Core/GameEngine/Source/GameNetwork/Network.cpp
Renames isTransferCommand to the static isMessageTypeWithinNetworkRange; adds incoming-message type validation guarded by #if !RETAIL_COMPATIBLE_CRC — the security check is inactive in the default build configuration
Sequence Diagram
sequenceDiagram
participant Remote as Remote Client
participant CM as ConnectionManager
participant Net as Network::RelayCommandsToCommandList
participant CL as TheCommandList
Remote->>CM: Send NetGameCommandMsg (NETCOMMANDTYPE_GAMECOMMAND)
CM->>Net: getFrameCommandList(frame)
Net->>Net: getGameMessageType()
alt "RETAIL_COMPATIBLE_CRC == 1 (default build)"
Net->>CL: appendMessage(constructGameMessage()) [no type check]
else "RETAIL_COMPATIBLE_CRC == 0"
alt type within MSG_BEGIN..MSG_END_NETWORK_MESSAGES
Net->>CL: appendMessage(constructGameMessage())
else type out of range
Net->>Net: DEBUG_LOG(rejecting game message...)
end
end
xezon
changed the title
fix(gamemessage): Verify allowed network type of incoming GameMessages
fix(network): Verify allowed network type of incoming GameMessages
May 15, 2026
xezon
changed the title
fix(network): Verify allowed network type of incoming GameMessages
fix(network): Verify accepted type of incoming game messages
May 15, 2026
xezon
added
Fix
Is fixing something, but is not user facing
NoRetail
This fix or change is not applicable with Retail game compatibility
labels
May 15, 2026
The reason will be displayed to describe this comment to others. Learn more.
Looking good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FixIs fixing something, but is not user facingMinorSeverity: Minor < Major < Critical < BlockerNetworkAnything related to network, serversNoRetailThis fix or change is not applicable with Retail game compatibility
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently outgoing
GameMessage's are checked usingNetwork::isTransferCommandbut incoming messages are not checked, which can potentially enable certain cheats. Credits to Caball for pointing this out.